/* This is a generated file. Don't edit. Edit the source instead.
 */

#include "notifications.h"


/*
 * Notification type search_response
 */

void nc_send_search_response_notification(nc_t *nc, void *response)
{
    nc_search_response_t search_response_data = {
        .response = response
    };
    nc_send_notification(nc, "search_response", &search_response_data);
}

void nc_add_search_response_observer(nc_t *nc, nc_search_response_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "search_response", (nc_callback_t)callback, user_data);
}


/*
 * Notification type filelist_finished
 */

void nc_send_filelist_finished_notification(nc_t *nc, const char *hub_address, const char *nick, const char *filename, bool auto_matched)
{
    nc_filelist_finished_t filelist_finished_data = {
        .hub_address = hub_address,
        .nick = nick,
        .filename = filename,
        .auto_matched = auto_matched
    };
    nc_send_notification(nc, "filelist_finished", &filelist_finished_data);
}

void nc_add_filelist_finished_observer(nc_t *nc, nc_filelist_finished_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "filelist_finished", (nc_callback_t)callback, user_data);
}


/*
 * Notification type download_finished
 */

void nc_send_download_finished_notification(nc_t *nc, const char *filename)
{
    nc_download_finished_t download_finished_data = {
        .filename = filename
    };
    nc_send_notification(nc, "download_finished", &download_finished_data);
}

void nc_add_download_finished_observer(nc_t *nc, nc_download_finished_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "download_finished", (nc_callback_t)callback, user_data);
}


/*
 * Notification type extra_slot_granted
 */

void nc_send_extra_slot_granted_notification(nc_t *nc, const char *nick, int extra_slots)
{
    nc_extra_slot_granted_t extra_slot_granted_data = {
        .nick = nick,
        .extra_slots = extra_slots
    };
    nc_send_notification(nc, "extra_slot_granted", &extra_slot_granted_data);
}

void nc_add_extra_slot_granted_observer(nc_t *nc, nc_extra_slot_granted_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "extra_slot_granted", (nc_callback_t)callback, user_data);
}


/*
 * Notification type external_ip_detected
 */

void nc_send_external_ip_detected_notification(nc_t *nc, const char *external_ip)
{
    nc_external_ip_detected_t external_ip_detected_data = {
        .external_ip = external_ip
    };
    nc_send_notification(nc, "external_ip_detected", &external_ip_detected_data);
}

void nc_add_external_ip_detected_observer(nc_t *nc, nc_external_ip_detected_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "external_ip_detected", (nc_callback_t)callback, user_data);
}


/*
 * Notification type share_file_added
 */

void nc_send_share_file_added_notification(nc_t *nc)
{
    nc_share_file_added_t share_file_added_data = {
    };
    nc_send_notification(nc, "share_file_added", &share_file_added_data);
}

void nc_add_share_file_added_observer(nc_t *nc, nc_share_file_added_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "share_file_added", (nc_callback_t)callback, user_data);
}


/*
 * Notification type share_scan_finished
 */

void nc_send_share_scan_finished_notification(nc_t *nc, const char *path)
{
    nc_share_scan_finished_t share_scan_finished_data = {
        .path = path
    };
    nc_send_notification(nc, "share_scan_finished", &share_scan_finished_data);
}

void nc_add_share_scan_finished_observer(nc_t *nc, nc_share_scan_finished_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "share_scan_finished", (nc_callback_t)callback, user_data);
}


/*
 * Notification type tth_available
 */

void nc_send_tth_available_notification(nc_t *nc, void *file, const char *tth, const char *leafdata_base64, double mibs_per_sec)
{
    nc_tth_available_t tth_available_data = {
        .file = file,
        .tth = tth,
        .leafdata_base64 = leafdata_base64,
        .mibs_per_sec = mibs_per_sec
    };
    nc_send_notification(nc, "tth_available", &tth_available_data);
}

void nc_add_tth_available_observer(nc_t *nc, nc_tth_available_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "tth_available", (nc_callback_t)callback, user_data);
}


/*
 * Notification type hashing_complete
 */

void nc_send_hashing_complete_notification(nc_t *nc)
{
    nc_hashing_complete_t hashing_complete_data = {
    };
    nc_send_notification(nc, "hashing_complete", &hashing_complete_data);
}

void nc_add_hashing_complete_observer(nc_t *nc, nc_hashing_complete_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "hashing_complete", (nc_callback_t)callback, user_data);
}


/*
 * Notification type will_remove_share
 */

void nc_send_will_remove_share_notification(nc_t *nc, const char *local_root)
{
    nc_will_remove_share_t will_remove_share_data = {
        .local_root = local_root
    };
    nc_send_notification(nc, "will_remove_share", &will_remove_share_data);
}

void nc_add_will_remove_share_observer(nc_t *nc, nc_will_remove_share_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "will_remove_share", (nc_callback_t)callback, user_data);
}


/*
 * Notification type did_remove_share
 */

void nc_send_did_remove_share_notification(nc_t *nc, const char *local_root, bool is_rescan)
{
    nc_did_remove_share_t did_remove_share_data = {
        .local_root = local_root,
        .is_rescan = is_rescan
    };
    nc_send_notification(nc, "did_remove_share", &did_remove_share_data);
}

void nc_add_did_remove_share_observer(nc_t *nc, nc_did_remove_share_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "did_remove_share", (nc_callback_t)callback, user_data);
}


/*
 * Notification type filelist_added
 */

void nc_send_filelist_added_notification(nc_t *nc, const char *nick, int priority)
{
    nc_filelist_added_t filelist_added_data = {
        .nick = nick,
        .priority = priority
    };
    nc_send_notification(nc, "filelist_added", &filelist_added_data);
}

void nc_add_filelist_added_observer(nc_t *nc, nc_filelist_added_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "filelist_added", (nc_callback_t)callback, user_data);
}


/*
 * Notification type filelist_removed
 */

void nc_send_filelist_removed_notification(nc_t *nc, const char *nick)
{
    nc_filelist_removed_t filelist_removed_data = {
        .nick = nick
    };
    nc_send_notification(nc, "filelist_removed", &filelist_removed_data);
}

void nc_add_filelist_removed_observer(nc_t *nc, nc_filelist_removed_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "filelist_removed", (nc_callback_t)callback, user_data);
}


/*
 * Notification type queue_source_removed
 */

void nc_send_queue_source_removed_notification(nc_t *nc, const char *target_filename, const char *nick)
{
    nc_queue_source_removed_t queue_source_removed_data = {
        .target_filename = target_filename,
        .nick = nick
    };
    nc_send_notification(nc, "queue_source_removed", &queue_source_removed_data);
}

void nc_add_queue_source_removed_observer(nc_t *nc, nc_queue_source_removed_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "queue_source_removed", (nc_callback_t)callback, user_data);
}


/*
 * Notification type queue_target_removed
 */

void nc_send_queue_target_removed_notification(nc_t *nc, const char *target_filename)
{
    nc_queue_target_removed_t queue_target_removed_data = {
        .target_filename = target_filename
    };
    nc_send_notification(nc, "queue_target_removed", &queue_target_removed_data);
}

void nc_add_queue_target_removed_observer(nc_t *nc, nc_queue_target_removed_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "queue_target_removed", (nc_callback_t)callback, user_data);
}


/*
 * Notification type queue_source_added
 */

void nc_send_queue_source_added_notification(nc_t *nc, const char *target_filename, const char *nick, const char *source_filename)
{
    nc_queue_source_added_t queue_source_added_data = {
        .target_filename = target_filename,
        .nick = nick,
        .source_filename = source_filename
    };
    nc_send_notification(nc, "queue_source_added", &queue_source_added_data);
}

void nc_add_queue_source_added_observer(nc_t *nc, nc_queue_source_added_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "queue_source_added", (nc_callback_t)callback, user_data);
}


/*
 * Notification type queue_target_added
 */

void nc_send_queue_target_added_notification(nc_t *nc, const char *target_filename, uint64_t size, const char *tth, int priority)
{
    nc_queue_target_added_t queue_target_added_data = {
        .target_filename = target_filename,
        .size = size,
        .tth = tth,
        .priority = priority
    };
    nc_send_notification(nc, "queue_target_added", &queue_target_added_data);
}

void nc_add_queue_target_added_observer(nc_t *nc, nc_queue_target_added_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "queue_target_added", (nc_callback_t)callback, user_data);
}


/*
 * Notification type queue_directory_removed
 */

void nc_send_queue_directory_removed_notification(nc_t *nc, const char *target_directory)
{
    nc_queue_directory_removed_t queue_directory_removed_data = {
        .target_directory = target_directory
    };
    nc_send_notification(nc, "queue_directory_removed", &queue_directory_removed_data);
}

void nc_add_queue_directory_removed_observer(nc_t *nc, nc_queue_directory_removed_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "queue_directory_removed", (nc_callback_t)callback, user_data);
}


/*
 * Notification type queue_priority_changed
 */

void nc_send_queue_priority_changed_notification(nc_t *nc, const char *target_filename, int priority)
{
    nc_queue_priority_changed_t queue_priority_changed_data = {
        .target_filename = target_filename,
        .priority = priority
    };
    nc_send_notification(nc, "queue_priority_changed", &queue_priority_changed_data);
}

void nc_add_queue_priority_changed_observer(nc_t *nc, nc_queue_priority_changed_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "queue_priority_changed", (nc_callback_t)callback, user_data);
}


/*
 * Notification type queue_directory_added
 */

void nc_send_queue_directory_added_notification(nc_t *nc, const char *target_directory, const char *nick)
{
    nc_queue_directory_added_t queue_directory_added_data = {
        .target_directory = target_directory,
        .nick = nick
    };
    nc_send_notification(nc, "queue_directory_added", &queue_directory_added_data);
}

void nc_add_queue_directory_added_observer(nc_t *nc, nc_queue_directory_added_callback_t callback, void *user_data)
{
    nc_add_observer(nc, "queue_directory_added", (nc_callback_t)callback, user_data);
}
